<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/commons/global.jsp" %>
<style>
.easyui-text-2{
	width: 140px; height: 25px;border-radius:5px;border:thin solid #ddd;
	border-color:#95B8E7;
}
.easyui-text-2:focus{
	outline: none;
}
</style>
<script type="text/javascript">
    $(function() {
        $('#sqlExcelFieldEditForm [name=columnType]').val('${sqlExcelField.columnType}');
        $('#sqlExcelFieldEditForm').form({
            url : '${path}/sqlExcelField/edit',
            onSubmit : function() {
                progressLoad();
                var isValid = $(this).form('validate');
                if (!isValid) {
                    progressClose();
                }
                return isValid;
            },
            success : function(result) {
                progressClose();
                result = $.parseJSON(result);
                if (result.success) {
                    showMsg(result.msg);
                    parent.sqlExcelColumnDatagrid.datagrid('reload');
                    parent.dialog.dialog('close');
                } else {
                    var form = $('#sqlExcelFieldEditForm');
                    parent.$.messager.alert('错误', result.msg, 'error');
                }
            }
        });
    });
</script>
<div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'center',border:false" title="" style="overflow-x:hidden;overflow-y: auto;padding: 3px;">
        <form id="sqlExcelFieldEditForm" method="post">
            <input type="hidden" name="id" value="${sqlExcelField.id}">
            <table class="grid">
                <tr>
                    <td>列名</td>
                    <td>
                        <input type="hidden" name="fid" value="${sqlExcelField.fid}">
                        <input name='columnName'   type='text' placeholder='请输入列名' class='easyui-text-2  span2 easyui-validatebox' data-options="required:true" value="${sqlExcelField.columnName}">
                    </td>
                    <td>字段名</td>
                    <td>
                        <input name='keyName'  value="${sqlExcelField.keyName}" type='text' placeholder='请输入字段名' class='easyui-text-2  span2 easyui-validatebox' data-options="required:true">
                    </td>
                </tr>
                <tr>
                    <td>顺序</td>
                    <td>
                        <input name='seq' value='${sqlExcelField.seq}'  type='number' placeholder='请输入顺序' class='easyui-text-2  span2 easyui-validatebox ' data-options="required:true">
                    </td>
                    <td>类型</td>
                    <td><select name="columnType" class="easyui-text-2">
                        <option value="String">字符串</option>
                        <option value="Date">日期</option>
                        <option value="DateTime">日期时间</option>
                    </select></td>
                </tr>
            </table>
        </form>
    </div>
</div>